#ifndef SINGLE
//  An adapted ObjectSpace example for use with SGI STL

#include <iostream.h>
#include <list.h>

#ifdef MAIN
#define list4_test main
#endif
#endif
int list4_test(int, char**)
{
  cout<<"Results of list4_test:"<<endl;
#ifndef ACORN_CFRONT
int array1 [] = { 1, 3, 6, 7 };
int array2 [] = { 2, 4 };
#else
static int array1 [] = { 1, 3, 6, 7 };
static int array2 [] = { 2, 4 };
#endif

  list<int> l1(array1, array1 + 4);
  list<int> l2(array2, array2 + 2);
  l1.merge(l2);

#ifndef ACORN_CFRONT
  for(list<int>::iterator i = l1.begin(); i != l1.end(); i++)
    cout << *i;
#else
  for(list_iterator<int> i = l1.begin(); i != l1.end(); i++)
    cout << *i;
#endif

  cout << endl;
  return 0;
}
